package com.wisdom.weld;

import com.wisdom.weld.pojo.TableAttribute;
import com.wisdom.weld.service.DatabaseDataService;
import com.wisdom.weld.service.GeneratorService;
import com.wisdom.weld.service.impl.DatabaseDataServiceImpl;
import com.wisdom.weld.service.impl.MybatisMapperGeneratorServiceImpl;

import java.util.List;

/**
 * Hello world!
 */
public class App {



    public static void main(String[] args) {
        DatabaseDataService service = new DatabaseDataServiceImpl();
        List<TableAttribute> tableAttributes = service.getTableAttributes();
//        List<ClassAttribute> classAttributes = JavaObjectConverter.convert(tableAttributes);
//        List<MapperXMLAttribute> convert = XMLObjectConverter.convert(tableAttributes);
//        System.out.println(JSON.toJSONString(convert));
//        GeneratorService generatorService = new MybatisGeneratorServiceImpl();
        GeneratorService generatorService = new MybatisMapperGeneratorServiceImpl();
        generatorService.generate(tableAttributes);

    }

}
